#include "BasicIncludes.h"
#include "LuaCommands.h"

static lua_State* L;

class GameApp
{
	//lua_State* L;

    protected:
        SDL_TimerID timer;
        bool done;
        
    public:
        // Constructor and destructor
        GameApp (void);
        virtual ~GameApp(void);

        // Initialization functions
        void InitApp(void);
		void InitLua(void);
        void InitializeSDL(void);
        void InstallTimer(void);
        static Uint32 GameLoopTimer(Uint32 interval, void* param);
        
        // Cleanup functions
        void Cleanup(void);
        
        // Event-related functions
        void EventLoop(void);
        void HandleUserEvents(SDL_Event* event);
        
        // Game related functions
        void GameLoop(void);
        void RenderFrame(void);
        
};

typedef GameApp* GameAppPtr;
typedef GameApp** GameAppHandle;

const int RUN_GAME_LOOP = 1;
